﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//importamos
using System.Data.Entity.ModelConfiguration;
using CredisysTriunfadores.BusinessEntites.Recursos;
using System.ComponentModel.DataAnnotations.Schema;


namespace CredisysTriunfadores.Repository.Mapping
{
    public class TasaInteresMap:EntityTypeConfiguration<TasaInteres>
    {
        public TasaInteresMap()
        {
            //clave primaria y identidad=true
            this.HasKey(ti => ti.Id);
            this.Property(ti => ti.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            //propiedades
            this.Property(ti => ti.Interes)
                .HasColumnType("decimal")
                .HasPrecision(9,2)
                .IsRequired();

        }
    }
}
